prompt method Displays an Prompt dialog box with a message and an input field Syntax prompt(message, input default) Description Use the prompt method to display a dialog box that takes user input. The arguments, message and input default are JavaScript values to be displayed as the message and the default value in the input field, respectively. Applies to window Examples prompt("Enter the number of doughnuts you want:", 12) See also alert, confirm methods ------------------------------------------------------------------------ random method Returns a pseudo-random number between zero and one. xxx NYI. Syntax xxx To be supplied. Applies to Math Examples xxx Examples to be supplied. ------------------------------------------------------------------------ round method Returns its argument, rounded to the nearest integer. In other words, if its argument is n.5 or greater (where n is an integer), returns n+1, otherwise returns n. Syntax round(arg) Applies to Math Examples xxx Examples to be supplied. ------------------------------------------------------------------------ select method For password, text, and textArea, selects the input area of the object. Syntax select() Description Use the select method to highlight the input area of a form element. You can use the select method with the focus method to highlight a field and position the cursor for a user response. Applies to password, text, textArea Examples In the following example, the checkPassword function confirms that a user has entered a valid password. If the password is not valid, the select method highlights the password field and focus method returns focus to it so the user can re-enter the password. function checkPassword(userPass) { if (badPassword) { alert("Please enter your password again.") userPass.focus() userPass.select() } } This example assumes that the password is defined as: /PRE> See also blur, focus methods ------------------------------------------------------------------------ setDate method Syntax dateObj.setDate(day) where dateObj is a date object. Description Sets the day of the month for the date object. The argument is an integer from 1 to 31. Applies to Date Examples The second statement below changes the day for theBigDay to the 24th of July from its original value. theBigDay = new Date("July 27, 1962 23:30:00") Xmas95.setDate(24) See also xxx To be supplied. ------------------------------------------------------------------------ setHours method Syntax dateObj.setHours(hours where dateObj is a date object. Description Sets the hours in the current time. The argument is an integer between 0 and 23. Applies to Date Examples theBigDay.setHours(7) See also xxx To be supplied. ------------------------------------------------------------------------ setMinutes method Syntax dateObj.setMinutes(minutes) where dateObj is a date object. Description Sets the minutes in the current time. The argument is an integer between 0 and 59. Applies to Date Examples theBigDay.setMinutes(45) See also xxx To be supplied. ------------------------------------------------------------------------ setMonth method Syntax dateObj.setMonth(month) where dateObj is a date object. Description Sets the month in the current date. The argument is an integer between 0 and 11. Applies to Date Examples theBigDay.setMonth(6) See also xxx To be supplied. ------------------------------------------------------------------------ setSeconds method Syntax dateObj.setSeconds(seconds) where dateObj is a date object. Description Sets the seconds in the current time. The argument is an integer between 0 and 59. Applies to Date Examples theBigDay.setSeconds(30) See also xxx To be supplied. ------------------------------------------------------------------------ setTime method Syntax dateObj.setTime(timevalue) where dateObj is a date object. Description Sets the value of the date object. This argument is the number of milliseconds since the epoch (1 January 1970 00:00:00) You can use this method to help assign a date and time to another date object. Applies to Date Examples theBigDay = new Date("July 1, 1999") sameAsBigDay = new Date(); sameAsBigDay.setTime(theBigDay.getTime()) ------------------------------------------------------------------------ setTimeout method Evaluates an expression after a specified number of milliseconds have elapsed. Syntax timeoutID=setTimeout(expression, msec) expression is a string expression. msec is a numeric value or numeric string in millisecond units. timeoutID is an identifier that is used only to cancel the evaluation with the clearTimeout method. Description xxx Description to be supplied. Applies to window Examples xxx Examples to be supplied. See also clearTimeout ------------------------------------------------------------------------ setYear method Syntax dateObj.setYear(year) where dateObj is a date object. Description Sets the year in the current date. Takes as its argument an integer greater than 1900. Applies to Date Examples theBigDay.setYear(96) See also xxx To be supplied. ------------------------------------------------------------------------ sin method Returns the sine of its argument. The argument is in radians. Syntax sin(arg) Applies to Math Examples xxx Examples to be supplied. See also acos, asin, atan, cos, tan methods ------------------------------------------------------------------------ small method Causes the calling string object to be displayed in small font by surrounding it with HTML small font tags, .. Syntax small() Description xxx Description to be supplied. Applies to string Examples xxx Examples to be supplied. See also big, fontsize methods ------------------------------------------------------------------------ sqrt method Returns the square root of its argument. Syntax sqrt(arg) Applies to Math Examples xxx Examples to be supplied. See also pow method ------------------------------------------------------------------------ strike method Causes the calling string object to be displayed as struck out text, by surrounding it with HTML strikeout tags, ... Syntax strike() Description xxx Description to be supplied. Applies to string Examples xxx Examples to be supplied. See also blink, bold, italics methods ------------------------------------------------------------------------ sub method Causes the calling string object to be displayed as a subscript by surrounding it with HTML subscript tags, ... Syntax sub() Description xxx Description to be supplied. Applies to string Examples xxx Examples to be supplied. sup method ------------------------------------------------------------------------ submit method Submits the form. Syntax submit() Description xxx Description to be supplied. Applies to form Examples xxx Examples to be supplied. ------------------------------------------------------------------------ substring method The substring method returns a subset of a string object. If a b, then it returns the subset starting at character b and ending at character a. If a = b, then it returns the empty string. Syntax substring(a, b) Description xxx Description to be supplied. Applies to string Examples If string x is "netscape"then x.substring(0,3) or x.substring(3,0) returns "net" and x.substring(4,7) or x.substring(7,4) returns "cap" ------------------------------------------------------------------------ sup method Causes the calling string object to be displayed as a superscript by surrounding it with HTML superscript tags, ... Syntax sup() Description xxx Description to be supplied. Applies to string Examples xxx Examples to be supplied. See also sub method ------------------------------------------------------------------------ tan method Returns the tangent of its argument. The argument is in radians. Syntax tan(arg) Applies to Math Examples xxx Examples to be supplied. See also acos, asin, atan, cos, sin methods ------------------------------------------------------------------------ toGMTString method Syntax dateObj.toGMTString() where dateObj is a date object. Description Converts a date to a String, using the Internet GMT conventions. Applies to Date Examples today.toGMTString() If today is a date object, then toGMTString would convert the date to GMT (UTC) using the operating system's time zone offset, and return a string value in the following form: Mon, 18 Dec 1995 17:28:35 GMT ------------------------------------------------------------------------ toLocaleString method Syntax dateObj.toLocaleString() where dateObj is a date object. Description Converts a date to a String, using the locale conventions. Applies to Date Examples today.toLocaleString() If today is a date object, then toLocaleString will return a string value in the following form: 12/18/95 17:28:35 ------------------------------------------------------------------------ toLowerCase method The toLowerCase method of string objects converts the string to all upper case. Syntax toLowerCase() Description xxx Description to be supplied. Applies to string Examples For example, "ALPHABET"toLowerCase yields "alphabet" See also toUpperCase method ------------------------------------------------------------------------ toString method For location, returns location.href, so you can use location as a string without typing "href" For Date, converts a date to a string. Syntax toString() Description xxx Description to be supplied. Applies to location, Date methods Examples Here is an example of using toString with a date object, assuming theBigDay is a date object: theBigDay.toString() More Examples to be supplied. ------------------------------------------------------------------------ toUpperCase method The toUpperCase method of string objects converts the string to all upper case. Syntax toUpperCase() Description xxx Description to be supplied. Applies to string Examples For example, "alphabet"toUpperCase yields "ALPHABET" See also toLowerCase method ------------------------------------------------------------------------ UTC method Syntax Date.UTC(year, month, mday [, hrs] [, min] [, sec]) Description UTC takes comma-delimited date parameters and returns the number of milliseconds since January 1, 1970 00:00:00, Universal Coordinated Time (GMT). The arameters are: •year - a year after 1900 •month - a month between 0-11 •date - day of the month between 1-31 •hrs - hours between 0-23 •min - minutes between 0-59 •sec - seconds between 0-59 UTC is a static method of Date. That means that you always use it as Date.UTC(), rather than as a method of a date object you created. Applies to Date Examples The following statement creates a date object using GMT instead of local time: gmtDate = new Date(Date.UTC(96, 11, 1, 0, 0, 0)) See also parse method ------------------------------------------------------------------------ write method Write HTML to the current window, in sequence with the HTML containing this SCRIPT. SCRIPTs have no effect on paragraphs or other structures in which they may occur. Syntax write() Description xxx Description to be supplied. Applies to document Examples xxx Examples to be supplied. See also writeln method ------------------------------------------------------------------------ writeln method The same as write(), but adds a newline character. Note that this affects only preformatted text (inside a
or tag).





Syntax




writeln()






Description






xxx Description to be supplied.





Applies to






document





Examples






xxx Examples to be supplied.





See also





write method